package com.redoor.app.stake.basicdata.commons;

import com.redoornetwork.framework.core.response.Status;

/**
 * 业务自定义错误状态，系统状态以1开头，自定义状态非1开头
 * Created by Floki on 2018/1/19.
 */
public enum BasicDataStatus implements Status {
    LOGIN_AUTH_FAILED("20001","用户中心无用户返回"),
    LOGIN_AUTH_NOROLE("20002","用户无权限访问"),
    REDIS_NO_AUTH("20101", "Redis认证错误"),
    OTHER_EXCEPTION("99999","未知异常"),
    STATION_IS_EXISTS("30001","充电站已存在"),
    STATION_IS_NOTEXISTS("30002","充电站不存在"),
    STATION_NOT_CHANGE("30003","充电站未修改"),
    STATION_ORG_NOT_EXISTS("30004","充电站编码缺失"),
    STATION_DISTRICT_NOT_EXISTS("30005","充电站地区缺失"),
    STAKE_IS_EXISTS("40002","充电桩不存在"),
    STAKE_NOT_CHANGE("40003","充电桩未修改"),
    CONSTSCODE_NOT_EXISTS("50001","常量码不存在"),
    PARAM_IS_EMPTY("50002","参数为空"),
    PARAM_IS_NOT_ENABLED("50003","参数未启用"),
    MQ_FUNCTION_DISABLE("50004","MQ功能未启用"),

    /*注册码保存,审核会用到*/
    WORKORDER_STATUS_FINISH("10005","已完成工单"),
    WORKORDER_STATUS_REJECT("10004","已拒绝工单"),
    WORKORDER_STATUS_APPLYING("10001","审核中工单"),

    /*检查目标工单状态返回值*/
    TARGET_WORKORDER_NOT_EXIST("30001","目标工单不存在"),
    TARGET_WORKORDER_AUDITED("30002","目标工单已审核"),
    TARGET_WORKORDER_NOT_AUDITED("30003","目标工单未审核"),
    TARGET_WORKORDER_ILLEGAL("30004","目标工单状态不正常")
    ;

    private String code;
    private String message;

    BasicDataStatus(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
